<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>{{$goodData['g_name']}}</title>
		<link rel="stylesheet" type="text/css" href="./Public/Home/css/index.css"/>
		<link rel="stylesheet" type="text/css" href="./Public/Home/css/login.css"/>
		<link rel="stylesheet" type="text/css" href="./Public/Home/css/content.css"/>
		<link rel="stylesheet" type="text/css" href="./Public/Home/css/common.css"/>
<script src="./Public/Home/js/jquery-1.7.2.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="./Public/Home/js/content.js" type="text/javascript" charset="utf-8"></script>
	<script src="./Public/Home/js/common.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
{{include file="VIEW_PATH/Common/header.php"}}
		<article>
			<div id="Content">
				<div class="Content_top">
					
						<div class="pro_info" style="display: block;">
					<!--内容上部分左侧-->
					<div class="C_Pic">
						<dl class="Picbox">
							<dt class="big_img">
								<ul>
									{{foreach from="$goodData['img']" key="$k" value="$v"}}
	     {{foreach from="$v['gd_medium']" key="$kk" value="$vv"}}
	     {{if value="!empty($vv)" }}
									<li class="big_img_l">
										<img src="{{$vv}}"/>
									</li>
									{{endif}}
									{{endforeach}}
									{{endforeach}}
								</ul>
								
							</dt>
							<dd class="selectimg">
								<div class="scrol">
									{{foreach from="$goodData['img']" key="$k" value="$v"}}
	     {{foreach from="$v['gd_medium']" key="$kk" value="$vv"}}
	        {{if value="!empty($vv)" }}
									<!--pic_k class控制鼠标移到谁就给谁加上边框-->
									<a href="" class="tinyPic pic_k">
										<img src="{{$vv}}" alt="" />
									</a>
										{{endif}}
									{{endforeach}}
									{{endforeach}}
								</div>
							</dd>
						</dl>
						
					</div>
					 <!--内容页上部分右侧-->
					<div class="C_info" >
						<div class="tr">
							<strong id="gn" gname = "{{$goodData['g_name']}}">{{$goodData['g_name']}}</strong>
							<p class="pic_desc">{{$goodData['g_ted']}}</p>
							
						</div>
						 <!--购物车开始-->
				
		<script type="text/javascript">
			
			$(function(){
				//商品名称
				var name = $("#gn").attr("gname");
				//商品id
				var gid = $(".put_num").attr("gid");
			    //价格
			    var price = $(".nowprice").attr("price");
				$(".addcarts").click(function(){
					var count = <?php  echo  count($goodData['spec']);  ?>;
//					alert(count);return;
					if($(".cur").length<count){
						alert("清选择规格");
						return;
					}
					var spec = "";
					
					$.each($(".cur"), function(k,v) {
						spec += $(this).attr("gaid") + ","
						
					});
//					alert(spec);return;
					var num = $(".put_num").val();
					$.ajax({
						type:"post",
						url:"{{U('getdata')}}",
						data:{gid:gid,price:price,num:num,name:name,"spec":spec},
						dataType:"json",
						success:function(data){
							if(data){
//								alert(data.id);
								window.location.href="{{U('Cart/index')}}";
							}
						}
					});
				})
			     
			})
			
		</script>
							<div class="tr" >
							<div class="pic_txt">
								<strong class="nowprice" price="{{$goodData['g_shopprice']}}"><em>￥</em>{{$goodData['g_shopprice']}}</strong>
							</div>
							{{foreach from="$goodData['spec']" key="$k" value="$v"}}
							{{if value="!empty($v['select'])"}}
							<div class="pic_txt">
								<span>{{$v['ta_name']}}</span>
								<ul class="glist">
									{{foreach from="$v['select']" key="$kk" value="$vv"}}
									<!--class="cur"控制选谁-->
									<li gaid="{{$vv['ga_value']}}" taid="{{$v['ta_id']}}"><a href="javascript:void" >{{$vv['ga_value']}}</a></li>
									{{endforeach}}
								</ul>
							</div>
							{{endif}}
							{{endforeach}}
						<div class="pic_txt">
								<span>数量</span>
								<div class="pro_num">
									<a href="javascript:void" class="num_minus disable">-</a>
									<input class="put_num" gid="{{$goodData['g_id']}}" value="1"></input>
									<a href="javascript:void" class="num_plus">+</a>
								</div>
							</div>
				<div class="pic_txt btn">
					<a href="javascript:void" class="addcart    <?php  if(!isset($_SESSION['uid'])){?> logins <?php }else{ ?> addcarts<?php }?>" ><i class="gicon"></i>加入购物车</a>
					<a href="" class="like "><i class="gicon"></i>喜欢</a>
				</div>
							</div>
					
						
							<!--//购物车结束-->
							
							<div class="tr">
							<span>保障</span>
							<ul class="baozhang">
								<li class="bao">满99包邮</li>
								<li class="a7">7天无理由退货</li>
								<li class="a15">15天免费换货</li>
							</ul>
						</div>
						</div>
					</div>
					<!--内容页下部分推荐搭配-->
					<div class="dp_title" style="display: none;">推荐搭配</div>
					<div class="db_cont"  style="display: none;">
						<div class="db_cont_jq">
							<div class="equal_icon">=</div>
							<p class="db_num">已选择0个配件</p>
							<p class="dp_jq_price">
							总计:<span>￥999.00</span>元
							</p>
							<div class="db_addcart">立即购买</div>
						</div>
						<div class="db_cont_zj">
						<a class="db_pimg"><img src="./Public/Home/img/dp1.jpg"/></a>
						<a class="db_pname">360手机大神Note3（输入dashen100优惠码减100元）</a>
						<p class="db_price" style="margin: 0;">￥999.00</p>
						</div>
						<div class="db_cont_tj">
							<div class="db_tj">
							 <div class="plus_icon">+</div>	
							 <div class="db_tj_img">
							 	<a class="db_pimg"><img src="./Public/Home/img/dp2.jpg"/></a>
						        <a class="db_pname">3360超级充电器（明朗绿）</a>
						        <p class="db_price">
						        	<input type="checkbox" name="" id="" value="" />
						        	￥999.00
						        </p>
						    </div>
							</div>
						    <div class="db_tj">
							 <div class="plus_icon">+</div>	
							 <div class="db_tj_img">
							 	<a class="db_pimg"><img src="./Public/Home/img/dp2.jpg"/></a>
						        <a class="db_pname">3360超级充电器（明朗绿）</a>
						        <p class="db_price">
						        	<input type="checkbox" name="" id="" value="" />
						        	￥999.00
						        </p>
						    </div>
							</div>
						</div>
					</div>
					</div>
				<!--下部分-->
				<div class="Content_bottom">
					<div class="gtab">
						
						<div class="gtab_in">
							<div class="links">
								<a href="" ><span>/</span>产品详情</a>
								<a href="" ><span>/</span>规格参数</a>
								<a href=""><span>/</span>常见问题</a>
							</div>
						</div>
					</div>
					<div class="gtab scrooltab">
						
						<div class="gtab_in">
							<div class="links ">
								<a href="" ><span>/</span>产品详情</a>
								<a href="" ><span>/</span>规格参数</a>
								<a href=""><span>/</span>常见问题</a>
								<div class="cart">
								<a href="" class="addcart"><i class="gicon"></i>加入购物车</a>
								</div>
							</div>
						</div>
					</div>
<div  class="gimg">
	{{$goodData['img'][0]['gd_info']}}
					</div>
					<div class="gtit">
						规格参数
					</div>
				    <div class="gcon">
				    	<div class="gArg"></div>
				    	<table class="col2" cellspacing="0" cellpadding="0">
				    		{{foreach from="$goodData['attr']" key="$k" value="$v"}}
				    	{{if value="!empty($v['select'])"}}
				    		{{foreach from="$v['select']" key="$kk" value="$vv"}}
				    		
				    		<tr><td class="left">{{$v['ta_name']}}</td><td>{{$vv['ga_value']}}</td></tr>
				    		{{endif}}
				    		{{endforeach}}
				    		{{endforeach}}
				    	</table>
				    </div>
				   <div class="gtit">
						常见问题
					</div>
					<div class="gcon">
						<dl class="cosult">
							<dt>
								<big>1、</big>
								<i></i>
								订单提交成功后还可以修改收货信息吗？ 
							</dt>
							<dd>
								<i></i>
								订单付款之前，您可以进入“我的订单”，在订单详情页内修改收货信息。付款之后将不可修改收货信息。 
							</dd>
						    <dt>
								<big>2、</big>
								<i></i>
								订单提交成功后还可以修改收货信息吗？ 
							</dt>
							<dd>
								<i></i>
								订单付款之前，您可以进入“我的订单”，在订单详情页内修改收货信息。付款之后将不可修改收货信息。 
							</dd>
						</dl>
					</div>
				</div>
			</div>
</article>
{{include file="VIEW_PATH/Common/footer.php"}}
<!--登录页面-->
{{include file="VIEW_PATH/Common/login.php"}}
<!--注册页面-->
{{include file="VIEW_PATH/Common/register.php"}}
		<!--右侧固定定位-->
{{include file="VIEW_PATH/Common/guright.php"}}
	</body>
</html>
